package com.bocai.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("s")
public class initSystemController {

    /**
     * 404
     *
     * @return
     */
    @RequestMapping(value = "404.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView goto404(ModelAndView modelAndView) {
        modelAndView.setViewName("404");
        return modelAndView;
    }

    /**
     * 404
     *
     * @return
     */
    @RequestMapping(value = "500.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView goto500(ModelAndView modelAndView) {
        modelAndView.setViewName("500");
        return modelAndView;
    }

    /**
     * 登录
     *
     * @return
     */
    @RequestMapping(value = "login.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoLogin(ModelAndView modelAndView) {
        modelAndView.setViewName("login");
        return modelAndView;
    }

    /**
     * 首页
     *
     * @return
     */
    @RequestMapping(value = "desk.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoDesk(ModelAndView modelAndView) {
        modelAndView.setViewName("desk");
        return modelAndView;
    }

    /**
     * 充值明细
     *
     * @return
     */
    @RequestMapping(value = "recharge-detail.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoRechargeDetail(ModelAndView modelAndView,Integer userId) {
        modelAndView.setViewName("recharge-detail");
        modelAndView.addObject(userId);
        return modelAndView;
    }

    /**
     * 提现明细
     *
     * @return
     */
    @RequestMapping(value = "withdraw-detail.do", method = RequestMethod.GET)
    @ResponseBody
    public ModelAndView gotoWithdrawDetail(ModelAndView modelAndView) {
        modelAndView.setViewName("withdraw-detail");
        return modelAndView;
    }

}
